//
//  UIAlertController+Block.h
//  高仿暴走斗图
//
//  Created by key on 16/3/23.
//  Copyright © 2016年 huangsongyao. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIAlertController (Block)

/**
 *  iOS8之后的选择框和提示框
 *
 *  @param title          title
 *  @param message        message
 *  @param preferredStyle 类型，枚举
 *  @param viewController present的控制器
 *  @param alertActions   UIAlertAction集合
 *  @param completion     present后执行的block
 */
+ (void)showAlertControllerWithTitle:(NSString *)title message:(NSString *)message preferredStyle:(UIAlertControllerStyle)preferredStyle showViewController:(UIViewController *)viewController alertActions:(NSArray<UIAlertAction *> *)alertActions presentCompletion:(void(^)())completion;

/**
 *  <#Description#>
 *
 *  @param title   <#title description#>
 *  @param style   <#style description#>
 *  @param enabled <#enabled description#>
 *  @param handler <#handler description#>
 *
 *  @return <#return value description#>
 */
+ (UIAlertAction *)createActionForTitle:(NSString *)title style:(UIAlertActionStyle)style isEnabled:(BOOL)enabled actionHandler:(void(^)(UIAlertAction *action))handler;

/**
 *  <#Description#>
 *
 *  @param title   <#title description#>
 *  @param style   <#style description#>
 *  @param handler <#handler description#>
 *
 *  @return <#return value description#>
 */
+ (UIAlertAction *)createActionForTitle:(NSString *)title style:(UIAlertActionStyle)style actionHandler:(void(^)(UIAlertAction *action))handler;

@end
